const int ledPin = 13;
int luzon = 0;
int valor_serial_read; 
 
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}

void loop(){

if (Serial.available())
{
valor_serial_read = Serial.read();

if(valor_serial_read ==48) //0
{ luzon = 0; }
else if (valor_serial_read ==49) //1
{ luzon = 1; }
}

if(luzon == 0)
{ digitalWrite(ledPin, LOW); }
else if (luzon == 1)
{ digitalWrite(ledPin, HIGH); }
  
}
